export default function jurisdiction() {
  if (!wx.getStorageSync('cookie')) {
    wx.showModal({
      title: '请先登陆',
      content: '该功能需要登陆才能使用',
      confirmText: '去登陆',
      cancelText: '回首页',
      confirmColor: '#f00',
      success({
        confirm
      }) {
        if (confirm) {
          wx.redirectTo({
            url: '/pages/login/login',
          })
        } else {
          wx.switchTab({
            url: '/pages/index/index',
          })
        }
      }
    })
    return false
  }
  return true
}